package com.bckj.fastboot.paid.biz.domain.pay.provider;

import com.bckj.fastboot.paid.biz.domain.pay.gateway.PayGateway;

import java.util.HashMap;
import java.util.Map;

public class PayGatewayProvider {

    public static final Map<String, PayGateway> PAY_GATEWAY_MAP = new HashMap<>();

    public static void register(String payWay, PayGateway payGateway) {
        PAY_GATEWAY_MAP.put(payWay, payGateway);
    }

    public static PayGateway get(String payWay) {
        return PAY_GATEWAY_MAP.get(payWay);
    }
}
